package string;

/**
 * String sbustring(int start,int end)
 */
public class SubstringDemo {
    public static void main(String[] args) {

        // 字符串截取
        String str="hello world!";
        System.out.println(str.substring(6,11));//world
        System.out.println(str.substring(6));//world!
    }
}
